package com.andy.blog.dal.mapper;

import com.andy.blog.dal.domain.ArticleDO;
import com.andy.blog.dal.domain.ArticleTagInfoDO;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

/**
 * Created by andy on 2023-06-17 11:34
 */
public interface TArticleMapper extends BaseMapper<ArticleDO> {


    /**
     * 更新
     */
    int updateByPrimaryKeySelective(ArticleDO articleDO);

    /**
     * 分页查询
     */
    Page<ArticleTagInfoDO> listByPage(IPage<ArticleDO> iPage, @Param(Constants.WRAPPER) QueryWrapper<ArticleDO> queryWrapper);

    /**
     * 查看文章详情信息
     */
    ArticleTagInfoDO selectArticleHomeById(Long articleId);
}
